<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * @version $Id: edit_club_info.tpl.php 1151 2008-06-24 15:07:32Z julienv $
 * @package Joomleague
 * @copyright Copyright (C) 2007  JoomLeague
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see _joomleague_license.txt
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

if (file_exists(JL_ADMIN_PATH.'/lang/'._JL_LANG.'.php')) {
  include(JL_ADMIN_PATH.'/lang/'._JL_LANG.'.php');
}
else {
  include(JL_ADMIN_PATH.'/lang/english.php');
}

?>
<script language="javascript" type="text/javascript">
    function submitbutton(pressbutton) {
            var form = document.adminForm;
     if (pressbutton == 'cancel') {
     			  submitform( pressbutton );
      		  return;
            }
            // do field validation
            if (form.name.value == ""){
             alert( "Le club doit avoir un nom!" );
           }
            else <?php 
              if ($jlgConfig['club_info_update_notify']=="1") {
              ?>
              if (confirm('<?php print _JL_CLUB_EDIT_EMAIL_NOTICE_WARNING; ?>'))
              <?php 
              }
              ?>{ 
                submitform( pressbutton );
            }
    }
</script>
<!-- Header with Project Name-->
<?php if ($showClub_config['show_project_heading'] == "1" OR $overall_config['show_project_heading'] == "1") { ?>
<div class="componentheading"><?php echo $htmlHelper->showTitle($joomleague, $overall_config['project_heading_type']); ?></div>

<!-- Druckfunktion Ende -->
<?php } ?>
<!-- Header END -->

<!-- Bereichsüberschrift z.B Tabelle, Tippabgabe usw. -->
<form name="adminForm" id="adminForm" method="post" action="<?php echo JLLIVEURL;?>/index.php">
<table width="100%" class="contentpaneopen">
	<tr>
		<td class="contentheading">
    <?php 
      echo _JL_CLUB_EDIT_INFO;
      if ( ! ( defined('JL_USER_IS_PROJECT_ADMIN') || defined('JL_USER_IS_PROJECT_EDITOR') || defined('JL_USER_IS_BIG_BOSS' )
        || ($my->id > 0 && $my->id == $club->admin) ) ) {
        echo "access not allowed";
        exit;
      }
    ?>
    
    </td>
	</tr>
</table>
<!-- Bereichsüberschrift Ende -->

<br />
<table cellpadding="4" cellspacing="1" border="0">
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_NAME;?></td>
		<td width="270"><input class="inputbox" type="text" name="name" size="50" maxlength="250" value="<?php echo $club->name;?>" /></td>
	</tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_ADRESS;?></td>
		<td width="270"><input class="inputbox" type="text" name="address" size="50" maxlength="250" value="<?php echo $club->address;?>" /></td>
	</tr>
	<tr>
		<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_POSTAL_CODE;?></td>
		<td width="270"><input class="inputbox" type="text" name="zipcode" size="10" maxlength="10" value="<?php echo $club->zipcode;?>" /></td>
	</tr>
	<tr>
		<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_TOWN;?></td>
		<td width="270"><input class="inputbox" type="text" name="location" size="50" maxlength="250" value="<?php echo $club->location;?>" /></td>
	</tr>
	   <tr>
		  <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_COUNTRY;?></td>
		  <td width="270">
		    <?php echo $clist;?>
		  </td>
		</tr>
	<tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_PHONE;?></td>
    <td width="270">
		  <input class="inputbox" type="text" name="phone" size="20" maxlength="20" value="<?php echo $club->phone;?>" />
    </td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_FAX;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="fax" size="20" maxlength="20" value="<?php echo $club->fax;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_MAIL;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="email" size="50" maxlength="255" value="<?php echo $club->email;?>" />
		</td>
  </tr>
	<tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_INTERNET;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="website" size="50" maxlength="250" value="<?php echo $club->website;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_MANAGER;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="manager" size="50" maxlength="250" value="<?php echo $club->manager;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_PRESIDENT;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="president" size="50" maxlength="250" value="<?php echo $club->president;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_FOUNDED;?></td>
    <td width="270">
      <input class="inputbox" type="text" name="founded" id="team_born" size="10" maxlength="19" value="<?php echo $club->founded;?>" />
    </td>
  </tr>
  <tr>
    <?php
    if (is_null($club->logo_big)) $logo_big="images/joomleague/placeholders/placeholder_150.png"; else $logo_big=$club->logo_big;
    ?>
    <td>&nbsp;</td>
    <td width="270"><?php if($logo_big != "") echo sprintf("<img src=%s/%s>",_JOOMLA_JL_LIVE_SITE,$logo_big); ?></td>
  </tr>
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_BIG; ?></td>
    <td width="270"><?php echo $logo_big_list; ?></td>
  </tr>
  <tr>
    <?php
    if (is_null($club->logo_middle)) $logo_middle="images/joomleague/placeholders/placeholder_150.png"; else $logo_middle=$club->logo_middle;
    ?>
    <td>&nbsp;</td>
    <td width="270"><?php if($logo_middle != "") echo sprintf("<img src=%s/%s>",_JOOMLA_JL_LIVE_SITE, $logo_middle); ?></td>
  </tr>
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_MIDDLE; ?></td>
    <td width="270"><?php echo $logo_middle_list; ?></td>
  </tr>
  <tr>
    <?php
    if (is_null($club->logo_small)) $logo_small="images/joomleague/placeholders/placeholder_150.png"; else $logo_small=$club->logo_small;
    ?>
    <td>&nbsp;</td>
    <td width="270"><?php if($logo_small != "") echo sprintf("<img src=%s/%s>",_JOOMLA_JL_LIVE_SITE,$logo_small); ?></td>
  </tr>
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_SMALL; ?></td>
    <td width="270"><?php echo $logo_small_list; ?></td>
  </tr>
</table>
<div align="center">   
<input class="button" name="saveInfo" value="<?php echo _JL_SAVE; ?>" onClick="javascript:submitbutton('save');">
<input class="button" name="cancel" value="<?php echo _JL_RESULTS_CANCEL; ?>" onClick="javascript:submitbutton('cancel');">
</div>
<input type="hidden" name="p" value="<?php echo $joomleague->id; ?>">
<input type="hidden" name="cid" value="<?php echo $club->id; ?>">
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="func" value="editClubInfo">
<input type="hidden" name="task" value="">
</form>
<br />


<!-- Print Button START -->
<?php if ($showClub_config['show_back_button'] > 0 OR $overall_config['show_back_button'] > 0) {;?>
<?php if ($showClub_config['show_back_button'] == "1" OR $overall_config['show_back_button'] == "1") echo '<div align="left">'; else echo '<div align="right">';?>
<?php
$params = & new mosParameters( '' );
$params->def( 'back_button', true );
$params->def( 'popup', false );
mosHTML::BackButton( $params );
  echo "</div>";
};?>
<!-- Print Button END -->
